package Java0308;

public class Loop5 {
    public static void main(String[] args) {
        //题目；求1-20之间的数的乘积(double)
        //定义循环变量并赋初值
        int i = 0;
        //定义sum变量存储1-20的乘积
        double sum = 1;
        while (i < 20) {
            //循环变量自增
            i++;
            sum *= i;
        }
        System.out.println("1-20之间的数的乘积:" + sum);
    }
}
